home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / PInterfaces / TextInputSystem.p < prev    next >
Text File  |  1996-05-01  |  4KB  |  137 lines

  1. {
  2.      File:        TextInputSystem.p
  3.  
  4.      Contains:    The handling of text input user interface.
  5.  
  6.      Version:    Technology:    System 8
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT TextInputSystem;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __TEXTINPUTSYSTEM__}
  28. {$SETC __TEXTINPUTSYSTEM__ := 1}
  29.  
  30. {$I+}
  31. {$SETC TextInputSystemIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __TYPES__}
  35. {$I Types.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __TEXTCOMMON__}
  38. {$I TextCommon.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __LOCALEOBJECTS__}
  41. {$I LocaleObjects.p}
  42. {$ENDC}
  43.  
  44. {$PUSH}
  45. {$ALIGN MAC68K}
  46. {$LibExport+}
  47.  
  48. {$IFC FOR_SYSTEM8_COOPERATIVE }
  49. { ____________________________________________________________________________________ }
  50. {
  51.  
  52. Routine:    GetCurrentTextInputLocaleIdentifier
  53.             gets the LocaleIdentifier of the currently selected text input object.
  54. Input:        NONE.
  55. Output:        langRegionCode: the currently selected object.
  56. OSStatus:    (no error, ?)
  57. NOTE:        System8 only.
  58.  
  59. }
  60. FUNCTION GetCurrentTextInputLocaleIdentifier(VAR langRegionCode: LocaleIdentifier): OSStatus; C;
  61. { ____________________________________________________________________________________ }
  62. {
  63.  
  64. Routine:    GetCurrentTextInputRef
  65.             gets the current text input object reference.
  66. Input:        NONE.
  67. Output:        textInputObject: the currently selected object.
  68. OSStatus:    (no error, ?)
  69. NOTE:        System8 only.
  70. }
  71. FUNCTION GetCurrentTextInputRef(VAR textInputObject: LocaleObjectRef): OSStatus; C;
  72. { ____________________________________________________________________________________ }
  73. {
  74.  
  75. Routine:    SetCurrentTextInputLocaleIdentifier
  76.             sets the current text input object according to the passed-in LocaleIdentifier.
  77. Input:        textInputObject: the object selected by the client.
  78. Output:        NONE.
  79. OSStatus:    (no error, invalide object)
  80. NOTE:        if the object is not shown, it will be displayed in the menu if the system supports
  81.             this language/region/... locale.
  82.  
  83. }
  84. FUNCTION SetCurrentTextInputLocaleIdentifier(langRegionCode: LocaleIdentifier): OSStatus; C;
  85. { ____________________________________________________________________________________ }
  86. {
  87.  
  88. Routine:    SetCurrentTextInputRef
  89.             sets the current text input object ref.
  90. Input:        textInputObject: the object selected by the client.
  91. Output:        NONE.
  92. OSStatus:    (no error, invalide object)
  93. NOTE:        if the object is not shown, it will be displayed in the menu if the system supports
  94.             this language/region/... locale.
  95. }
  96. FUNCTION SetCurrentTextInputRef(textInputObject: LocaleObjectRef): OSStatus; C;
  97. {
  98. ____________________________________________________________________________________
  99.     routines for converting between a text input object ref and the new LocaleIdentifier
  100. ____________________________________________________________________________________
  101. }
  102. {
  103.  
  104. Routine:    GetLocaleIdentifierFromTextInputObjectRef
  105.             returns the LocaleIdentifier textInputObject represents.
  106. Input:        textInputObject:    the reference of text input object.
  107. Output:        langRegionCode:        localeIdentifier that this objects is stamped with.
  108. OSStatus:    (no error, ?)
  109. NOTE:        System8 only.
  110.  
  111. }
  112. FUNCTION GetLocaleIdentifierFromTextInputObjectRef(textInputObject: LocaleObjectRef; VAR langRegionCode: LocaleIdentifier): OSStatus; C;
  113. { ____________________________________________________________________________________ }
  114. {
  115.  
  116. Routine:    GetTextInputObjectRefFromLocaleIdentifier
  117.             gets the object ref last designated by the user as representing the lanaguag/region
  118.             LocaleIdentifier (or simply returns the default one), otherwise it returns null.
  119. Input:        langRegioncode:        value of LocaleIdentifier.
  120. Output:        textInputObject:    best match returned object.
  121. OSStatus:    (no error, ?)
  122. NOTE:        System8 only.
  123.  
  124. }
  125. FUNCTION GetTextInputObjectRefFromLocaleIdentifier(langRegionCode: LocaleIdentifier; VAR textInputObject: LocaleObjectRef): OSStatus; C;
  126. {$ENDC}
  127. {$ALIGN RESET}
  128. {$POP}
  129.  
  130. {$SETC UsingIncludes := TextInputSystemIncludes}
  131.  
  132. {$ENDC} {__TEXTINPUTSYSTEM__}
  133.  
  134. {$IFC NOT UsingIncludes}
  135.  END.
  136. {$ENDC}
  137.